// pages/basics/toast-top/toast-top.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    message:"",
    status:"",
  },
  onReady(){
    this.toast = this.selectComponent("#toast-top");
  },
  click1(){
    this.setData({
      message:"成功的信息",
      status:"success",
    })
    this.toast.setShow();
  },
  click2(){
    this.setData({
      message:"失败的信息",
      status:"error",
    })
    this.toast.setShow();
  }
})